package com.cast.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cast.health.pojo.CheckItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface CheckItemMapper extends BaseMapper<CheckItem> {

    //根据检查项的id删除 t_checkgroup_checkitem 表对象
    @Delete("delete from t_checkgroup_checkitem where checkitem_id = #{id}")
    int deleteCheckGroupAndCheckItem(Integer id);

    //根据id删除 t_checkItem 对象
    //DELETE FROM t_checkItem WHERE id=?
    @Delete("DELETE FROM t_checkItem WHERE id = #{id}")
    int deleteCheckItem(Integer id);

}
